home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TeX 1995 July
/
TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO
/
web
/
c_cpp
/
cwebx
/
extras
< prev
next >
Wrap
Text File
|
1995-02-13
|
5KB
|
85 lines
Here are the extras that are put in the new version:
- A compatibility mode with Levy/Knuth CWEB, selectable by a `+c' argument.
This should allow you to process files written for Levy/Knuth CWEB without
any change provided they don't use C++ heavily (little has been done
here). There should no longer be problems with use of macros defined in
cwebmac.tex, since a special compatibility mode macro file cwebcmac.tex is
used instead of cwebxmac.tex that matches the cwebmac.tex format in all
aspects that are relevant to the user. There is one small exception, namely
that the macro `\PB', which is a no-op in Levy/Knuth CWEB, has been given a
non-empty definition to ensure that the code in `|...|' will be processed
correctly even if it is used in math mode. This should cause no problem
(it should even be more robust than in Levy/Knuth CWEB), except to those
who have (independently) redefined `\PB' for some other task; that
redifinition should then be modified to incorporate the function of the
cwebcmac definition as well.
- All extra's introduced in Levy/Knuth CWEB 3.0 are now also present, most of
them even outside compatibility mode. These include @s, @q, @** and @*1
etc., @h for <Preprocessor directives> (but outside compatibility mode it
is called @p because @h was already in use), @l. Module names can be
abbreviated on first occurrence, specified completely later, and they may
appear in text when enclosed in `|...|'. `@@' is allowed everywhere with
obvious interpretation (even in `@= ... @>' and `@( ... @>'). You can get
p the index and module names on separate files by setting the triple file
flag `+t' for CWEAVE.
- The output file can optionally be specified by a third file name argument.
For second argument (change file) `-' means use none, `+' means use
default.
- A mode for CTANGLE to suppress #line lines, and to preserve/reconstruct
indentation, spacing and (most) comments from the source file, to get
reasonably readable output. This can be some fun, and useful for broken
compilers/debuggers that can't handle #line, or for people who want to
practice literate programming without their boss finding out about it.
Selectable by `-l' command line argument. Also, as a service to people who
have means to automatically generate CWEB source files, the programs now
understands #line directives in the same way that C compilers do, and
adjusts its internal file name and line number accordingly.
- A directory for @i files can be specified as in Levy/Knuth CWEB either by
compiling with symbol CWEBINPUTS="/path/name/" or by an environment
variable (note the final pathname separator, necessary to make this
UNIX-independent). Similarly @h files can be found by specifying one or
more search paths; one can be compiled in by CWEBHEADERS="/path/name/", and
more can be added by command line arguments `-I/another/path/'.
- You can force to even out the number of pages before generating the table
of contents (useful if you have a two-sided printer) by specifying `+e'
to CWEAVE.
- For those who like even more compact printed output (like me), you can run
together multiple local declarations (those that follow `{' inside a
function) on the same line (if it fits), by specifying `+m' to CWEAVE. Of
course other syntax-modifiers `+a', `+f', `+u', `+w' are still present, and
the more general options `++' and `+c' also affect pretty-printing.
- Output of @f lines has been improved, especially in case the category
TeX or NULL is assigned: both the true identifier at the left hand side
is displayed (in italics) and the form the identifier takes in the printed
output (by a TeX macro).
- Some new features are somewhat restricted when not in compatibility mode,
to improve the diagnostic possibilities. (1) Characters with codes >=128
are _only_ allowed in identifiers when they have been declared via @l, so
that CTANGLE can warn about stray 8-bit characters. (2) The use of module
names within `|...|' is only allowed if they are the last token (not
counting tokens such as `@;' that are ignored by CTANGLE) before the
closing `|'; in this way CTANGLE (which is unaware of opening and closing
of `|...|') can warn if the first module name in a section is not followed
by `=' or `|', instead of assuming that when the `=' is missing it must be
inside `|...|', possibly leading to accidental loss of the module body.
- A feature that was there all along but which I forgot to advertise enough,
is that CTANGLE counts braces and parentheses in each module and macro
body; any mismatches will be reported and ``corrected''. This is quite
useful in normal practice, since if left in, the mismatches could lead to
very mysterious error messages from the compiler, where the real error
occurs way out of sight from the point it is reported. Admittedly this
feature rules out some very bad style programs, for instance using #if
#else #endif where the conditional parts have unbalanced braces. Such
programs will also utterly confuse CWEAVE's parser anyway.